<?php
/**
 * Description of TSqlDeleteclass
 *
 * @author Saulo
 */
final class TSqlDelete extends TSqlInstruction {
    public function getInstruction()
    {
        $this->sql .= "DELETE FROM {$this->entity}";
        //retorna a clausula where do objeto $this->criteria
        if($this->criteria)
        {
            $expression = $this->criteria->dump();
            if($expression)
            {
                $this->sql .= ' WHERE ' . $expression;
            }
        }
       return utf8_decode($this->sql);
    }
}
?>
